Field of the Invention
The present invention relates to data processing. More particularly, this invention relates to controlling access to a memory.
Description of the Prior Art
It is known that certain data stored in a memory may need careful protection. For example, where the memory is provided as part of a smartcard, the data which the smartcard holds may include credit card details and/or encryption keys which it is important to keep hidden from unauthorised access. One approach to protecting such secure content is to erase the data once it is no longer needed, but this has the disadvantage that it can take a long time to erase all the data. Moreover, the power consumption associated with this full erase process can on the one hand be a disadvantage (for example in a mobile context) and furthermore can in itself represent a security weakness in that aspects of this process can be detectable outside the chip via the peripheral pins and may enable a hacker to derive information related to the secure data being erased. For example this may be due to the fact that the power consumption signature differs in dependence on the previous value held by each bit cell of an on-chip memory.
Other known techniques, such as that disclosed by US patent application publication 2009/0063799, have provided mechanisms for protecting a particular region of memory in which access to the particular region of memory may be initially allowed (for example during initialisation of the system), but thereafter any data read out from that address region is blocked by a masking function to prevent the data from reaching the outside. Accordingly, this technique remains vulnerable to the above mentioned power analysis attacks, both in terms of the power consumption signature when the data is read (since the reading of the data is carried out as normal, but only the provision of the read data values to the outside is blocked) and in terms of its vulnerability to power consumption analysis attacks resulting from writing data to the memory and deducing the previous value of the stored data from the power consumption signature.
Moreover, various existing techniques for protecting the content of a memory are either relatively slow or require relatively large areas to be sacrificed for their circuitry.
Accordingly, it would be desirable to provide an improved technique for protecting the content of a memory which addresses the above mentioned drawbacks of the prior art.